<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        promise和定时器执行顺序
        promise会优于定时器
     -->
    <script>
        console.log("3");
        setTimeout(()=>{
            console.log("2");
        })
        Promise.resolve().then(()=>{
            console.log("1");
        })
    </script>
</body>
</html>